package com.qf.java2106.huangshengrui.hotel.Listeners;
/**
 * @author q
 * @date 2021/10/25
 * @version V1.0
 **/

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class StaticResourceFolderListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent event) {
        ServletContext context = event.getServletContext();
        context.setAttribute("backendStyleFolder",context.getContextPath()+"/backend/detail/style");
        context.setAttribute("backendDetailFolder",context.getContextPath()+"/backend/detail");
        context.setAttribute("ctx",context.getContextPath());
        context.setAttribute("frontStyleFolder",context.getContextPath()+"/front/detail/style");
        context.setAttribute("frontDetailFolder",context.getContextPath()+"/front/detail");
    }

    @Override
    public void contextDestroyed(ServletContextEvent event) {

    }

}
